# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>

pkgname=qtxdg-tools
pkgver=3.12.0
pkgrel=1
pkgdesc="libqtxdg user tools"
arch=("loong64" "x86_64")
url="https://github.com/lxqt/qtxdg-tools"
license=("LGPL2.1")
depends=("qt5-base" "libqtxdg")
makedepends=("cmake" "qt5-tools" "lxqt-build-tools")
source=("https://github.com/lxqt/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc})
sha256sums=('8afba8c57647ccbec27964c021b1f317866bb93c7293f60319a340b6484bf883'
            'SKIP')
validpgpkeys=(
  "19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)
conflicts=('libqtxdg<3.9.1')

build() {
  cmake -B build -S "$srcdir/$pkgname-$pkgver" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
